package com.forenow.demo4;

public class K {
    public void m1(X x){
        x.init();
    }
    public X m2(){
        X x=new Y();
        return x;
    }

    public static void main(String[] args) {
        K k =new K();
        X x=new Y();
        k.m1(x);
        x=new Z();
        k.m1(x);

    }
}
